package com.scsj.supermarket.view.activity.testmodel;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;


import com.scsj.supermarket.R;
import com.scsj.supermarket.interfaces.GoodsType;
import com.scsj.supermarket.utils.SkipUtils;
import com.scsj.supermarket.view.activity.baseactivitymodel.BaseActivity;

public class TestGoodsTypeActivity extends BaseActivity implements View.OnClickListener {

    private Button button, button2, button3, button4, button5, button6, button7, button8, button9, button10;

    @Override
    protected void createView(Bundle savedInstanceState) {
        setContentView(R.layout.activity_test_goods_type);
    }

    @Override
    protected void initView() {
        button = findViewById(R.id.button);
        button2 = findViewById(R.id.button2);
        button3 = findViewById(R.id.button3);
        button4 = findViewById(R.id.button4);
        button5 = findViewById(R.id.button5);
        button6 = findViewById(R.id.button6);
        button7 = findViewById(R.id.button7);
        button8 = findViewById(R.id.button8);
        button9 = findViewById(R.id.button9);
        button10 = findViewById(R.id.button10);
    }


    @Override
    protected void initListener() {
        button.setOnClickListener(this);
        button2.setOnClickListener(this);
        button3.setOnClickListener(this);
        button4.setOnClickListener(this);
        button5.setOnClickListener(this);
        button6.setOnClickListener(this);
        button7.setOnClickListener(this);
        button8.setOnClickListener(this);
        button9.setOnClickListener(this);
        button10.setOnClickListener(this);
    }

    @Override
    protected void initData() {

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.button:
                SkipUtils.toGoodsDetails(this, GoodsType.common);
                break;
            case R.id.button2:
                SkipUtils.toGoodsDetails(this, GoodsType.together);
                break;
            case R.id.button3:
                SkipUtils.toGoodsDetails(this, GoodsType.seckill);
                break;
            case R.id.button4:
                SkipUtils.toGoodsDetails(this, GoodsType.reserve);
                break;
            case R.id.button5:
                SkipUtils.toGoodsDetails(this, GoodsType.reserveLimit);
                break;
            case R.id.button6:
                SkipUtils.toGoodsDetails(this, GoodsType.dream);
                break;
            case R.id.button7:
                SkipUtils.toGoodsDetails(this, GoodsType.earnestMoney);
                break;
            case R.id.button8:
                SkipUtils.toGoodsDetails(this, GoodsType.earnestIntegral);
                break;
            case R.id.button9:
                SkipUtils.toGoodsDetails(this, GoodsType.group);
                break;
            case R.id.button10:
                SkipUtils.toGoodsDetails(this, GoodsType.iflashbuy);
                break;
        }
    }
}
